home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-22 | 2.7 KB | 89 lines | [TEXT/CWIE] |
- // ===========================================================================
- // CExep.cp ©1996 Sunbay Development Group. All rights reserved.
- // ===========================================================================
- // Oct 31,1996
-
- #include <TextUtils.h>
-
- #include <LCaption.h>
-
- #include "CExep.h"
-
- // ---------------------------------------------------------------------------
- // Constructor
- // ---------------------------------------------------------------------------
-
- CExep::CExep(void) {
- }
-
- CExep::CExep(OSType inType, OSType inCode, char *inFile, short inLine) {
- mType = inType;
- mCode = inCode;
- mLine = inLine;
- ::BlockMoveData(inFile, mFile, sizeof(Str255));
- mFile[255] = 0;
- ::c2pstr((char *) mFile);
- }
-
- // ---------------------------------------------------------------------------
- // Destructor
- // ---------------------------------------------------------------------------
-
- CExep::~CExep() {
- }
-
- // ---------------------------------------------------------------------------
- // Castom the alert
- // ---------------------------------------------------------------------------
-
- #define pid_Title 31003
- #define pid_Text 31004
- #define pid_File 31006
- #define pid_Line 31008
- #define pid_Code 31010
-
- Str255 sExepAlertTitle = "\pThe debug exeption occured.";
- Str255 sExepAlertText = "\pNo comments.";
- Str255 sExepAlertFile = "\pDidn't define.";
- Str32 sExepAlertLine = "\p???? ";
- Str32 sExepAlertCode = "\p";
-
- void CExep::CastomAlert(LDialogBox *inDialog) {
- if(inDialog == nil) return;
- LCaption * theCaption;
- if((theCaption = (LCaption *) inDialog->FindPaneByID(pid_Title)) != nil)
- theCaption->SetDescriptor(sExepAlertTitle);
- if((theCaption = (LCaption *) inDialog->FindPaneByID(pid_Text)) != nil)
- theCaption->SetDescriptor(sExepAlertText);
- if((theCaption = (LCaption *) inDialog->FindPaneByID(pid_File)) != nil) {
- ::BlockMoveData(mFile, sExepAlertFile, sizeof(Str255));
- theCaption->SetDescriptor(sExepAlertFile);
- }
- if((theCaption = (LCaption *) inDialog->FindPaneByID(pid_Line)) != nil) {
- ::NumToString(mLine, sExepAlertLine);
- theCaption->SetDescriptor(sExepAlertLine);
- }
- if((theCaption = (LCaption *) inDialog->FindPaneByID(pid_Code)) != nil) {
- ::NumToString(mCode, sExepAlertCode);
- theCaption->SetDescriptor(sExepAlertCode);
- }
- ::SysBeep(1);
- }
-
- // ---------------------------------------------------------------------------
- // Explan a type of exeption
- // ---------------------------------------------------------------------------
-
- StringPtr CExep::ExplaneType(void) {
- return nil;
- }
-
- // ---------------------------------------------------------------------------
- // Explan a code of exeption
- // ---------------------------------------------------------------------------
-
- StringPtr CExep::ExplaneCode(void) {
- return nil;
- }
-
-